﻿
Partial Class UCFeaturedProduct
    Inherits System.Web.UI.UserControl

    Public Sub Display(id As Integer)
        Display(CProduct.Cache.GetById(id))
    End Sub
    Public Sub Display(p As CProduct)
        If IsNothing(p) Then
            Me.Visible = False
            Exit Sub
        End If
        Me.Visible = True

        img.ImageUrl = CSitemap.ProductImage(p)
        lnkThumb.ToolTip = p.ProductName
        lnkThumb.NavigateUrl = CSitemap.Decide(p)

        litName.Text = p.ProductName
        lnkMore.Navigateurl = lnkThumb.NavigateUrl
    End Sub

End Class
